package borge.web.teamspirit.client.page.main.panels;

import borge.web.teamspirit.client.interfaces.ServerCallbackHandler;
import borge.web.teamspirit.client.page.PagePanel;
import borge.web.teamspirit.client.page.shared.widgets.ListTeamsWidget;
import borge.web.teamspirit.client.servercomm.DBQueryResults;

import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class MainPagePanel extends PagePanel implements ServerCallbackHandler {

	private ListTeamsWidget iListTeams;
	private VerticalPanel iPanel;
	
	public MainPagePanel(){
		
		iPanel = new VerticalPanel();
		
		iListTeams = new ListTeamsWidget(null, null, null);
		
		iListTeams.requestServerData(this);
		
		add(iListTeams, DockPanel.CENTER);
	}

	@Override
	public void handleServerCallback(DBQueryResults aResult, CallbackType aType) {
		// TODO Auto-generated method stub
		
		
		iListTeams.dataUpdate(aResult);
	}

	@Override
	public void handleServerError(Throwable t) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void handleToken(String aToken) {
		// TODO Auto-generated method stub
		
	}
	
}
